<template>
  <div class="captcha-wrap">
    <Ainput v-bind="instance" @change="inputChange"></Ainput>
    <img
      class="pass-verifyCode"
      alt="验证码"
      title="验证码"
      :src="curCaptchaPath"
      @click="handleCb({cb:'refreshAuthCode'})">
  </div>
</template>

<script>
import Ainput from './Ainput.vue'

export default {
  props: {
    instance: Object // 配置
  },
  data() {
    return {
      curCaptchaPath: '' // 二维码的url
    }
  },
  components: {
    Ainput
  },
  mounted() {
    Object.assign(this, { ...this.instance }) // 把传入的参数，融合到this中
  },
  methods: {
    inputChange() {
      // console.log(v)
    },
    updateVal(value) {
      this.$emit('change', value)
    }
  }
}
</script>
